<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
{% ifequal lang "eng" %}
	<title>{{title.eng}}</title>
{% else %}
	<title>{{title.rus}}</title>
{% endifequal %}
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<link rel="stylesheet" href="css/style.css" type="text/css" />


 	<script type="text/javascript" src="scripts/jquery-1.3.2.min.js"></script>
    <script type="text/javascript" src="scripts/jquery-ui-1.7.2.custom.min.js"></script>
    <link rel="Stylesheet" type="text/css" href="style/jqueryui/ui-lightness/jquery-ui-1.7.2.custom.css" />

    <script type="text/javascript" src="scripts/jHtmlArea-0.7.0.js"></script>
    <link rel="Stylesheet" type="text/css" href="style/jHtmlArea.css" />


</head>

<body>


    <script type="text/javascript">    
        // You can do this to perform a global override of any of the "default" options
        // jHtmlArea.fn.defaultOptions.css = "jHtmlArea.Editor.css";

        $(function() {
            //$("textarea").htmlarea(); // Initialize all TextArea's as jHtmlArea's with default values

            $("#txtDefaultHtmlArea").htmlarea(); // Initialize jHtmlArea's with all default values

            $("#txtCustomHtmlArea").htmlarea({
                // Override/Specify the Toolbar buttons to show
                toolbar: [
                    ["bold", "italic", "underline", "|", "forecolor"],
                    ["p", "h1", "h2", "h3", "h4", "h5", "h6"],
                    ["link", "unlink", "|", "image"],                    
                    [{
                        // This is how to add a completely custom Toolbar Button
                        css: "custom_disk_button",
                        text: "Save",
                        action: function(btn) {
                            // 'this' = jHtmlArea object
                            // 'btn' = jQuery object that represents the <A> "anchor" tag for the Toolbar Button
                            alert('SAVE!\n\n' + this.toHtmlString());
                        }
                    }]
                ],

                // Override any of the toolbarText values - these are the Alt Text / Tooltips shown
                // when the user hovers the mouse over the Toolbar Buttons
                // Here are a couple translated to German, thanks to Google Translate.
                toolbarText: $.extend({}, jHtmlArea.defaultOptions.toolbarText, {
                        "bold": "fett",
                        "italic": "kursiv",
                        "underline": "unterstreichen"
                    }),

                // Specify a specific CSS file to use for the Editor
                css: "style//jHtmlArea.Editor.css",

                // Do something once the editor has finished loading
                loaded: function() {
                    //// 'this' is equal to the jHtmlArea object
                    //alert("jHtmlArea has loaded!");
                    //this.showHTMLView(); // show the HTML view once the editor has finished loading
                }
            });
        });
    </script>
    
<div class="content">
  <div class="preheader">
	<div class="padding">{{username}} <a href="/login">Админка</a> </div>   
  </div>
  <div class="header">
      	{% ifequal lang "eng" %}
	<div class="title">{{title.eng}}</div>
	<div class="slogan">{{slogan.eng}}</div>
	{% else %}
	<div class="title">{{title.rus}}</div>
	<div class="slogan">{{slogan.rus}}</div>
	{% endifequal %}
  </div>
  <div id="nav">
   
  </div>
  <div class="main_content">
    <div class="sd_left">
      <div class="text_padding">
<form action="/edit" method="post">
id:{{uuid}} - {{date}}<br/>
<input type="hidden" name="uuid" value="{{uuid}}"/>
Title: <input type="text" name="title" value="{%if model.title %}{{model.title}}{% endif %}" size="70" /><br/>
Content:<br/>

<textarea id="txtDefaultHtmlArea" cols="100%" rows="30" name="content">{{model.content}}</textarea>

eng:<br/>
<input type="text" name="title_eng" value="{%if model.title_eng %}{{model.title_eng}}{% endif %}" size="70" disabled=disabled/><br/>

<textarea name="content_eng" cols="75" rows="2" >{%if model.content_eng %}{{model.content_eng}}{% endif %}</textarea><br/>

Кeywords: <input type="text" name="keywords" value="{%if model.keywords %}{{model.keywords}}{% endif %}" size="70" /><br/>


Category:<select name="category">

{% for key in menu %}
		 <option value="{{ key.id }}" {% ifequal key.id model.category %}selected="selected"{% endifequal %}>{{ key.id }}</main>
	{% endfor %}
	
</select>
<br/>

Visible: <input type="checkbox" name="visible" value="True"  {%if model.visible %} checked="checked"{% endif %}" /><br/>
<br/>
<input type="hidden" name="create" value="true"  />
<input type="submit" value="CreateUpdate" />
<a href="/article/{{uuid.id}}" target="_blank">Preview</a></h2>
</form>
<br/>

<a href="/" >Home page</a><br/>

<br/><br/>
{% if user %}
<a href="/edit?delete=true&uuid={{uuid}}" >Delete</a>
{% endif%}

    		
    		
      </div>
    </div>
    <div class="footer">
     
    </div>
  </div>
</div>

	
	
</body>
</html>
